﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using PiaoanWeb.AppLogic.BusinessLogicLayer;
using PiaoanWeb.AppLogic.DataAccessLayer;
using PiaoanWeb.Helpers;
namespace PiaoanWeb
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                FormsAuthentication.SignOut();

                NewsBLL newsBLL = new NewsBLL();
                NewsGridView.DataSource = newsBLL.GetLatestNews();
                NewsGridView.DataBind();

                ProductsBLL productsBLL = new ProductsBLL();
                ProductRepeater.DataSource = productsBLL.GetLatestProducts();
                ProductRepeater.DataBind();
            }
        }
    }
}